package com.gsj.maintain.exception;

import com.gsj.common.pojo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


//@RestControllerAdvice //处理全局异常的注解
@RestControllerAdvice  //控制层异常处理类
public class GlobalException {

    @ExceptionHandler(value = Exception.class)
    public R exceptionHandler(Exception e){
         e.printStackTrace();//开发看的
          return R.error();

    }
}